package com.systop.asset.mapper;

import com.systop.asset.entity.Material;
import com.systop.asset.entity.vo.MaterialListVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
@Mapper
public interface MaterialMapper {
    int insertMaterial(Material material);
    int deleteMaterial(int id);
    int editorMaterial(Material material);
    List<MaterialListVo> selectMaterial(MaterialListVo vo);

    /**
     * 根据id查询
     * @param id
     * @param wid
     * @return
     */
    Material getMaterialById(Long id,Long wid);

    /**
     * 根据名称和仓库查询耗材
     * @param name 耗材名称
     * @param warehouseId 仓库id
     * @return
     */
    List<Material> selectMaterialByName(@Param("name") String name,@Param("warehouseId") Long warehouseId);
}
